const REFRESH_TOKEN = 'refresh_token_key'
const ACCESS_TOKEN = 'access_token_key'
const UUID = 'uuid_key'
const USER_INFO = 'user_info_obj'
const HAS_LOGIN = 'has_login_key'
const SNOW_TOKEN = 'snow_field'
const CART_LIST = 'cart_list'
const YUEPAI_LIST = 'yuepai_list'
const MEAL_DATA = 'meal_data'
const KONG_LIST = 'kong_list'

const ACCESS_KEY_ID = 'access_key_id'
const ACCESS_KEY_SECRET = 'access_key_secret'
const OSS_HOST = 'oss_host'

// 认证令牌

// 写入accessToken
export function setToken(val) {
	return uni.setStorageSync(ACCESS_TOKEN, val)
}

//获取accessToken
export function getToken() {
	return uni.getStorageSync(ACCESS_TOKEN)
}

// 删除accessToken
export function removeToken() {
	return uni.removeStorageSync(ACCESS_TOKEN)
}

// 写入刷新token 
export function setRefreshToken(val) {
	return uni.setStorageSync(REFRESH_TOKEN, val)
}

// 写入uuid
export function setUuid(val) {
	return uni.setStorageSync(UUID, val)
}

// 获取uuid
export function getUuid() {
	return uni.getStorageSync(UUID)
}

// 写入用户信息
export function setUserInfo(val) {
	return uni.setStorageSync(USER_INFO, val)
}

// 获取用户信息
export function getUserData() {
	return uni.getStorageSync(USER_INFO)
}

// 写入登录
export function setHasLogin(val) {
	return uni.setStorageSync(HAS_LOGIN, val)
}

// 获取是否登录
export function getHasLogin() {
	return uni.getStorageSync(HAS_LOGIN)
}

// 写入购物车
export function setCartList(val) {
	return uni.setStorageSync(CART_LIST, val)
}

// 获取购物车
export function getCartList() {
	return uni.getStorageSync(CART_LIST)
}

// 写入约拍
export function setYuePaiList(val) {
	return uni.setStorageSync(YUEPAI_LIST, val)
}

// 获取约拍
export function getYuePaiList() {
	return uni.getStorageSync(YUEPAI_LIST)
}

// 写入空镜素材
export function setKongList(val) {
	return uni.setStorageSync(KONG_LIST, val)
}
// 获取空镜素材
export function getKongList() {
	return uni.getStorageSync(KONG_LIST)
}

// 删除购物车
export function removeCartList() {
	uni.removeStorageSync(CART_LIST)
}

//写入套餐信息
export function setMealData(val) {
	return uni.setStorageSync(MEAL_DATA, val)
}

// 获取套餐信息
export function getMealData(val) {
	return uni.getStorageSync(MEAL_DATA, val)
}

// 删除套餐信息
export function removeMealData() {
	return uni.removeStorageSync(MEAL_DATA)
}

// 写入雪场snowField
export function setSnowToken(val) {
	return uni.setStorageSync(SNOW_TOKEN, val)
}

// 获取雪场snowField
export function getSnowToken() {
	return uni.getStorageSync(SNOW_TOKEN)
}

// 写入oss的accessid
export function setAccessKeyId(val) {
	return uni.setStorageSync(ACCESS_KEY_ID, val)
}
// 获取oss的accessid
export function getAccessKeyId() {
	return uni.getStorageSync(ACCESS_KEY_ID)
}
// 写入oss的accesskey
export function setAccessKeySecret(val) {
	return uni.setStorageSync(ACCESS_KEY_SECRET, val)
}
// 获取oss的accesskey
export function getAccessKeySecret() {
	return uni.getStorageSync(ACCESS_KEY_SECRET)
}
// 写入oss的osshost
export function setOssHost(val) {
	return uni.setStorageSync(OSS_HOST, val)
}
// 获取oss的osshost
export function getOssHost() {
	return uni.getStorageSync(OSS_HOST)
}